<template>
  <div>
    <el-tooltip content="引导">
      <svg-icon id="guide-start" icon="guide" @click="onClick" />
    </el-tooltip>
  </div>
</template>

<script setup lang="ts">
import Driver from 'driver.js'
import 'driver.js/dist/driver.min.css'
import { onMounted } from 'vue'
import steps from './steps'
let driver = null
onMounted(() => {
  driver = new Driver({
    allowClose: false, //禁止点击蒙版关闭
    closeBtnText: '关闭',
    nextBtnText: '下一步',
    prevBtnText: '上一步'
  })
})

const onClick = () => {
  driver.defineSteps(steps())
  driver.start()
}
</script>

<style scoped></style>
